<template>
	<view class="box">

		<view class="orderwrap">
			<view class="orderitem"  v-for="item in lists"  :key="item.id" >
				<view class="itemtop">
					<view class="name">
					</image> {{item.local_seller.name}}
					</view>
					<view class="tag2" >
						已退款
					</view>
					
				</view>
				<view class="itemcenter">
					<image :src="item.order_relation.image" mode="aspectFill"></image>
					<!-- <image :src="itm.image" mode="aspectFill"></image> -->
					<view class="itemcenterright">
						<view class="itemcenterrightitem">
							{{item.order_relation.goods_name}}
						</view>
						<view class="itemcenterrightitem">
							<text class="textone">数量X{{item.refund_num}}</text>
						</view>
						<view class="itemcenterrightitem">
							￥{{item.apply_money}}
						</view>
					</view>
				</view>
				<view class="itemcenterbot">
				
					<view class="btnwrap">
						<!-- <text class="btn1" v-if="status===0" >取消</text> -->
						
						<text class="btn1"  @click="gonext(item.id)">查看退款</text>
						
					</view>
				</view>
			</view>
			<view class="empty2">
				
			</view>
			<noDatas  :xxxList="lists" :status="status"></noDatas>
		</view>
	
	</view>
</template>

<script>
	import {orderRefundlist}from "../../api/local.js"
	export default {
		data() {
			return {
				toggleList: [
					{
						label: '全部',
						statusval:"",
						select: true
					}, {
						label: '待处理',
						statusval:"1",
						select: false
					}
					
				
				],
				selval:"",
				indexs:0,
				status:5,
				page:1,
				size:50,
				status:"loadmore",
				lists:[],
				
			}
		},
		onLoad(e) {

			this.getlist()
		},
		methods: {
			getlist(){
				orderRefundlist({
					page:this.page,
					page_size:this.size
				}).then(res=>{
					if (res.code == 1) {
						let list = res.data.data;
						this.lists = this.page == 1 ? list : this.lists.concat(list);
						console.log(this.lists);
						if (list.length < this.size) this.status = 'nomore';
						else this.status = 'loading';
					}
					console.log(this.lists)
				})
			},
			gonext(id){
				uni.navigateTo({
					url:"/pageOrder/localorder/refundlist?id="+id
				})
			}
		},
		onReachBottom() {
			if (this.status != 'nomore') {
				this.page = this.page + 1
				this.getlist()
			}
		},
	}
</script>

<style lang="scss">
	.box{
		position: relative;
		width: 750rpx;
		height: 100vh;
	}
	.tab-nav {
		width: 750rpx;
		height: 100rpx;
		background-color:#fff;
		// margin-left: 20rpx;
		display: flex;
		align-items: center;
		position: fixed;
		
		z-index: 999;
		justify-content: space-around;
		.tab-list-item {
			position: relative;
			.text {
				display: flex;
				justify-content: center;
				align-items: center;
				padding: 10rpx;
				opacity: 1;
				font-weight: 500;
				text-align: center;
				font-size: 32rpx;
				color: #A6A5AF;
				z-index: 99;
				position: relative;
			}

			.active {
				font-weight: 700;
				color: #333333;
				z-index: 98;
				position: relative;
			}
			.line{
				width: 66rpx;
				height: 10rpx;
				background: linear-gradient( 90deg, #FA2222 2%, #FFC400 98%);
				border-radius: 118rpx 118rpx 118rpx 118rpx;
				position: absolute;
				top: 70%;
				left: 50%;
				transform: translate(-50%);
				z-index: 60;
			}
		}
	}
	.orderwrap{
		width: 750rpx;
		position: relative;
		// top: 120rpx;
		margin-top: 20rpx;
		.orderitem{
			width: 690rpx;
			background: #FFFFFF;
			border-radius: 24rpx 24rpx 24rpx 24rpx;
			margin: 0 auto;
			margin-bottom: 30rpx;
			padding-bottom: 30rpx;
			.itemtop{
				display: flex;
				.name{
					display: flex;
					margin-top: 38rpx;
					width: 500rpx;
					margin-left: 24rpx;
					
				}
				.tag{
					margin-top: 38rpx;
					margin-left: 24rpx;
					width: 96rpx;
					height: 42rpx;
					border-radius: 8rpx 8rpx 8rpx 8rpx;
					border: 1rpx solid #F63418;
					font-weight: 400;
					font-size: 24rpx;
					color: #F63418;
					text-align: center;
					line-height: 42rpx;
				}
				.tag2{
					margin-top: 38rpx;
					margin-left: 24rpx;
					width: 96rpx;
					height: 42rpx;
					border-radius: 8rpx 8rpx 8rpx 8rpx;
					border: 1rpx solid #999999;
					font-weight: 400;
					font-size: 24rpx;
					color: #999999;
					text-align: center;
					line-height: 42rpx;
				}
			}
			.itemcenter{
				height: 140rpx;
				margin-top: 30rpx;
				margin-left: 24rpx;
				display: flex;
				>image{
					width: 140rpx;
					height: 140rpx;
					border-radius: 20rpx 20rpx 20rpx 20rpx;
				}
				.itemcenterright{
					margin-left: 24rpx;
					display: flex;
					flex-direction: column;
					justify-content: space-between;
					.itemcenterrightitem{
						width: 450rpx;
						// margin-top: 10rpx;
						white-space: nowrap;         /* 强制文本不换行 */
						    overflow: hidden;           /* 隐藏溢出部分 */
						    text-overflow: ellipsis;    /* 显示省略号 */
							color: #333;
						.textone{
							font-weight: 400;
							font-size: 26rpx;
							color: #666666;
						}
						.texttwo{
							font-weight: 400;
							font-size: 26rpx;
							color: #666666;
							margin-left: 34rpx;
						}
					}
				}
			}
			.itemcenterbot{
				display: flex;
				position: relative;
				margin-top: 32rpx;
				margin-left: 22rpx;
				align-items: center;
				justify-content: flex-end;
				padding-bottom: 20rpx;
				.time{
					.text1{
						font-weight: 400;
						font-size: 26rpx;
						color: #F63418;
					}
					.text2{
						font-weight: 400;
						font-size: 26rpx;
						color: #666666;
					}
				
				}
				.btnwrap{
					display: flex;
					align-items: center;
					margin-right: 24rpx;
					.btn1{
						width: 152rpx;
						height: 52rpx;
						border-radius: 536rpx 536rpx 536rpx 536rpx;
						border: 1rpx solid #A6A5AF;
						text-align: center;
						line-height: 52rpx;
						font-weight: 400;
						font-size: 26rpx;
						color: #333333;
						margin-left: 24rpx;
					}
					.btn2{
						width: 152rpx;
						height: 52rpx;
						border-radius: 536rpx 536rpx 536rpx 536rpx;
						border: 1rpx solid #F63418;
						text-align: center;
						line-height: 52rpx;
						font-weight: 400;
						font-size: 26rpx;
						color: #F63418;
						margin-left: 24rpx;
					}
				}
			}
		}
	}
</style>
